package aiguigu03.field_method.field.exer2;

/**
 * ClassName: EmployeeTest
 * Package: field.exer2
 * Description:
 *
 * @Author ZY
 * @Create 2024/9/22 21:11
 * @Version 1.0
 */
public class EmployeeTest {
    public static void main(String[] args) {
        //创建Employee的一个实例（对象）
        Employee emp1 = new Employee();

        emp1.id = 1001;
        emp1.name = "杰克";
        emp1.age = 24;
        emp1.salary = 8900;
        emp1.birthday = new MyDate();//引用数据类型要new
        emp1.birthday.year = 1998;
        emp1.birthday.month = 2;
        emp1.birthday.day = 28;

        //打印
        System.out.println("id = " +emp1.id + ",name = " + emp1.name +
                 ",age = " + emp1.age + ",salary = " +emp1.salary + ",birthday = [" +
                emp1.birthday.year + "年" +
                emp1.birthday.month + "月" +
                emp1.birthday.day + "日]");
    }
}
